package design.mode.chapter3.item3.version2.Storage;

import design.mode.chapter3.item3.version2.domain.RequestInfo;

import java.util.List;
import java.util.Map;

/**
 * 负责原始数据的存储和读取。
 */
public interface MetricsStorage {
    void saveRequestInfo(RequestInfo requestInfo);

    List getRequestInfos(String apiName, long startTimeInMillis, long endTimeInMillis);

    Map<String, List<RequestInfo>> getRequestInfos(long startTimeInMillis, long endTimeInMillis);
}
